package ru.neoflex.datatable;

import java.util.List;

import ru.neoflex.dataobject.DataObject;

public class DataObjectAdapterImpl implements DataRowsAdapter {

	private List<DataObject> items;
	
	public DataObjectAdapterImpl(List<DataObject> items) {
		this.items = items;
	}

	@Override
	public List<DataObject> getItems() {
		return items;
	}

	public void setItems(List<DataObject> items) {
		this.items = items;
	}

	@Override
	public int getItemsCount() {
		if (items == null) {
			return 0;
		} else {
			return items.size();			
		}
	}

}
